<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>JavaScript 事件</title>
</head>
<body>
<h2>HTML 事件1</h2>
<p>本例onclick 属性（以及代码）被添加到 &button 元素:</p>

<button
onclick="document.getElementById('demo').innerHTML=Date()">时间是？</button>

<p id="demo"></p>
</body>
</html>